package cn.rengy.web.framework.property.web;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.rengy.lang.ResultEntity;
import cn.rengy.web.framework.property.service.PropertyService;


@Controller
@RequestMapping(value = "/authenticated/property")
public class PropertyController {
	private static Logger logger = LoggerFactory.getLogger(PropertyController.class);
	@Autowired
	private PropertyService propertyService;
	
	/**
	 * 保存提醒
	 * @param paramMap
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value="/{name}",method=RequestMethod.POST)
	@ResponseBody
    public ResultEntity<?> get(@PathVariable("name") String name) throws Exception{
		return ResultEntity.ok(propertyService.getProperty(name));
    }
}
